Prefactor for Trampoline MPP accumulation#4510
Prefactor for Trampoline MPP accumulation#4510carlaKC wants to merge 9 commits intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @valentinewallace as a reviewer! |
We'll re-use this logic to timeout tick incoming trampoline MPP.
We'll re-use this to check trampoline MPP timeout in future commits.
We're going to use the same logic for trampoline and for incoming MPP payments, so we pull this out into a separate function.
We'll only use this for non-trampoline incoming accumulated htlcs, because we want different source/failure for trampoline.
To use helper functions for either trampoline or regular paths.
Added so that we can create ClaimableHTLC for trampoline tests in a separate file, rather than needing to make several fields pub(crate) just for the sake of tests.
For trampoline payments, we don't want to enforce a minimum cltv delta between our incoming and outer onion outgoing CLTV because we'll calculate our delta from the inner trampoline onion's value. However, we still want to check that we get at least the CLTV that the sending node intended for us and we still want to validate our incoming value. Refactor to allow setting a zero delta, for use for trampoline payments.
40f75a4 to
f15271e
Compare
|
I've completed a thorough re-review of every file and hunk in this PR diff, including examining the source code for context around the changes. My prior review found no issues, and this re-review confirms that finding. No issues found. The refactoring is semantically equivalent to the original code:
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4510 +/- ##
========================================
Coverage 86.19% 86.19%
========================================
Files 160 160
Lines 107537 107713 +176
Branches 107537 107713 +176
========================================
+ Hits 92693 92848 +155
- Misses 12220 12238 +18
- Partials 2624 2627 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR contains a set of refactors pulled out of #4493: